<!-- HTML header for doxygen 1.8.13-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>MTB CAT1 Peripheral driver library: SMPU Functions</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen_style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><a href="http://www.cypress.com/"><img alt="Logo" src="IFXCYP_one-line.png"/></a></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">MTB CAT1 Peripheral driver library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__group__prot__functions__smpu.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">SMPU Functions<div class="ingroups"><a class="el" href="group__group__prot.html">Prot         (Protection Unit)</a> &raquo; <a class="el" href="group__group__prot__functions.html">Functions</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">General Description</h2>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga672858f1cf85d6633ba0a16b6c01f0bf"><td class="memItemLeft" align="right" valign="top">__STATIC_INLINE <a class="el" href="group__group__prot__enums.html#ga13ede85383a4afaf5ed3a14b470e38bd">cy_en_prot_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__prot__functions__smpu.html#ga672858f1cf85d6633ba0a16b6c01f0bf">Cy_Prot_DisableSmpuStruct</a> (<a class="el" href="struct_p_r_o_t___s_m_p_u___s_m_p_u___s_t_r_u_c_t___type.html">PROT_SMPU_SMPU_STRUCT_Type</a> *base)</td></tr>
<tr class="memdesc:ga672858f1cf85d6633ba0a16b6c01f0bf"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function disables both the master and slave parts of a protection unit.  <a href="#ga672858f1cf85d6633ba0a16b6c01f0bf">More...</a><br /></td></tr>
<tr class="separator:ga672858f1cf85d6633ba0a16b6c01f0bf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9d10062d2d4cb3d656141b7d3217d7a9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__prot__enums.html#ga13ede85383a4afaf5ed3a14b470e38bd">cy_en_prot_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__prot__functions__smpu.html#ga9d10062d2d4cb3d656141b7d3217d7a9">Cy_Prot_GetSmpuStruct</a> (<a class="el" href="struct_p_r_o_t___s_m_p_u___s_m_p_u___s_t_r_u_c_t___type.html">PROT_SMPU_SMPU_STRUCT_Type</a> **base, <a class="el" href="group__group__prot__enums.html#gaaeba5a362760906a0b1e0f73a177d9d7">cy_en_prot_req_mode_t</a> reqMode, uint32_t smpuIndex)</td></tr>
<tr class="memdesc:ga9d10062d2d4cb3d656141b7d3217d7a9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Functions returns a pointer of the requested unused SMPU structure.  <a href="#ga9d10062d2d4cb3d656141b7d3217d7a9">More...</a><br /></td></tr>
<tr class="separator:ga9d10062d2d4cb3d656141b7d3217d7a9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1152bf9c8a08744825b62d7d3ddad10d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__prot__enums.html#ga13ede85383a4afaf5ed3a14b470e38bd">cy_en_prot_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__prot__functions__smpu.html#ga1152bf9c8a08744825b62d7d3ddad10d">Cy_Prot_ConfigSmpuMasterStruct</a> (<a class="el" href="struct_p_r_o_t___s_m_p_u___s_m_p_u___s_t_r_u_c_t___type.html">PROT_SMPU_SMPU_STRUCT_Type</a> *base, const <a class="el" href="structcy__stc__smpu__cfg__t.html">cy_stc_smpu_cfg_t</a> *config)</td></tr>
<tr class="memdesc:ga1152bf9c8a08744825b62d7d3ddad10d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Configures a Shared Memory Protection Unit (SMPU) master protection struct with its protection attributes.  <a href="#ga1152bf9c8a08744825b62d7d3ddad10d">More...</a><br /></td></tr>
<tr class="separator:ga1152bf9c8a08744825b62d7d3ddad10d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac5c238971d86bc638507259c9a461f54"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__prot__enums.html#ga13ede85383a4afaf5ed3a14b470e38bd">cy_en_prot_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__prot__functions__smpu.html#gac5c238971d86bc638507259c9a461f54">Cy_Prot_ConfigSmpuSlaveStruct</a> (<a class="el" href="struct_p_r_o_t___s_m_p_u___s_m_p_u___s_t_r_u_c_t___type.html">PROT_SMPU_SMPU_STRUCT_Type</a> *base, const <a class="el" href="structcy__stc__smpu__cfg__t.html">cy_stc_smpu_cfg_t</a> *config)</td></tr>
<tr class="memdesc:gac5c238971d86bc638507259c9a461f54"><td class="mdescLeft">&#160;</td><td class="mdescRight">Configures a Shared Memory Protection Unit (SMPU) slave protection struct with its protection attributes.  <a href="#gac5c238971d86bc638507259c9a461f54">More...</a><br /></td></tr>
<tr class="separator:gac5c238971d86bc638507259c9a461f54"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga87bd25407886fb5072cc108af2dcb305"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__prot__enums.html#ga13ede85383a4afaf5ed3a14b470e38bd">cy_en_prot_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__prot__functions__smpu.html#ga87bd25407886fb5072cc108af2dcb305">Cy_Prot_EnableSmpuMasterStruct</a> (<a class="el" href="struct_p_r_o_t___s_m_p_u___s_m_p_u___s_t_r_u_c_t___type.html">PROT_SMPU_SMPU_STRUCT_Type</a> *base)</td></tr>
<tr class="memdesc:ga87bd25407886fb5072cc108af2dcb305"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enables the Master SMPU structure.  <a href="#ga87bd25407886fb5072cc108af2dcb305">More...</a><br /></td></tr>
<tr class="separator:ga87bd25407886fb5072cc108af2dcb305"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaefa4f2694e66f39444b714b8505305b7"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__prot__enums.html#ga13ede85383a4afaf5ed3a14b470e38bd">cy_en_prot_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__prot__functions__smpu.html#gaefa4f2694e66f39444b714b8505305b7">Cy_Prot_DisableSmpuMasterStruct</a> (<a class="el" href="struct_p_r_o_t___s_m_p_u___s_m_p_u___s_t_r_u_c_t___type.html">PROT_SMPU_SMPU_STRUCT_Type</a> *base)</td></tr>
<tr class="memdesc:gaefa4f2694e66f39444b714b8505305b7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disables the Master SMPU structure.  <a href="#gaefa4f2694e66f39444b714b8505305b7">More...</a><br /></td></tr>
<tr class="separator:gaefa4f2694e66f39444b714b8505305b7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3398e43534912ca2b980d08d08287801"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__prot__enums.html#ga13ede85383a4afaf5ed3a14b470e38bd">cy_en_prot_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__prot__functions__smpu.html#ga3398e43534912ca2b980d08d08287801">Cy_Prot_EnableSmpuSlaveStruct</a> (<a class="el" href="struct_p_r_o_t___s_m_p_u___s_m_p_u___s_t_r_u_c_t___type.html">PROT_SMPU_SMPU_STRUCT_Type</a> *base)</td></tr>
<tr class="memdesc:ga3398e43534912ca2b980d08d08287801"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enables the Slave SMPU structure.  <a href="#ga3398e43534912ca2b980d08d08287801">More...</a><br /></td></tr>
<tr class="separator:ga3398e43534912ca2b980d08d08287801"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7d5ad654f90ef163ce8dcb14a21379f3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__prot__enums.html#ga13ede85383a4afaf5ed3a14b470e38bd">cy_en_prot_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__prot__functions__smpu.html#ga7d5ad654f90ef163ce8dcb14a21379f3">Cy_Prot_DisableSmpuSlaveStruct</a> (<a class="el" href="struct_p_r_o_t___s_m_p_u___s_m_p_u___s_t_r_u_c_t___type.html">PROT_SMPU_SMPU_STRUCT_Type</a> *base)</td></tr>
<tr class="memdesc:ga7d5ad654f90ef163ce8dcb14a21379f3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disables the Slave SMPU structure.  <a href="#ga7d5ad654f90ef163ce8dcb14a21379f3">More...</a><br /></td></tr>
<tr class="separator:ga7d5ad654f90ef163ce8dcb14a21379f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga672858f1cf85d6633ba0a16b6c01f0bf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga672858f1cf85d6633ba0a16b6c01f0bf">&#9670;&nbsp;</a></span>Cy_Prot_DisableSmpuStruct()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__STATIC_INLINE <a class="el" href="group__group__prot__enums.html#ga13ede85383a4afaf5ed3a14b470e38bd">cy_en_prot_status_t</a> Cy_Prot_DisableSmpuStruct </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_p_r_o_t___s_m_p_u___s_m_p_u___s_t_r_u_c_t___type.html">PROT_SMPU_SMPU_STRUCT_Type</a> *&#160;</td>
          <td class="paramname"><em>base</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function disables both the master and slave parts of a protection unit. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The base address for the SMPU structure to be disabled.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Status of the function call.</dd></dl>
<table class="doxtable">
<tr>
<th>Status </th><th>Description  </th></tr>
<tr>
<td>CY_PROT_SUCCESS </td><td>The Master and Slave SMPU struct was disabled </td></tr>
<tr>
<td>CY_PROT_FAILURE </td><td>The Master and/or slave SMPU struct was not disabled </td></tr>
<tr>
<td>CY_PROT_INVALID_STATE </td><td>Function was called on the unsupported PERI IP version </td></tr>
</table>
<dl class="section user"><dt>Function Usage</dt><dd><div class="fragment"><div class="line">    </div><div class="line">    <span class="comment">/* Scenario: The struct of PROT_SMPU_SMPU_STRUCT0 needs to be disabled.</span></div><div class="line"><span class="comment">                 Or it needs to be reconfigured and hence must first be disabled. </span></div><div class="line"><span class="comment">                 Both Slave and Master structures will be disabled. */</span></div><div class="line">    </div><div class="line">    <span class="keywordflow">if</span>(<a class="code" href="group__group__prot__enums.html#gga13ede85383a4afaf5ed3a14b470e38bda462f07fcb31ed8a07dd273af4290691d">CY_PROT_SUCCESS</a> != <a class="code" href="group__group__prot__functions__smpu.html#ga672858f1cf85d6633ba0a16b6c01f0bf">Cy_Prot_DisableSmpuStruct</a>(PROT_SMPU_SMPU_STRUCT0))</div><div class="line">    {</div><div class="line">        <span class="comment">/* Insert error handling */</span></div><div class="line">    }</div><div class="line"></div></div><!-- fragment --></dd></dl>

</div>
</div>
<a id="ga9d10062d2d4cb3d656141b7d3217d7a9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga9d10062d2d4cb3d656141b7d3217d7a9">&#9670;&nbsp;</a></span>Cy_Prot_GetSmpuStruct()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__prot__enums.html#ga13ede85383a4afaf5ed3a14b470e38bd">cy_en_prot_status_t</a> Cy_Prot_GetSmpuStruct </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_p_r_o_t___s_m_p_u___s_m_p_u___s_t_r_u_c_t___type.html">PROT_SMPU_SMPU_STRUCT_Type</a> **&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__group__prot__enums.html#gaaeba5a362760906a0b1e0f73a177d9d7">cy_en_prot_req_mode_t</a>&#160;</td>
          <td class="paramname"><em>reqMode</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>smpuIndex</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Functions returns a pointer of the requested unused SMPU structure. </p>
<p>It searches the SMPU structures until it finds one that both the slave and master sections are disabled. After an available structure is located, function enables the slave structure and set the ATT0[7:0] bits to 0xFF, to make sure that a subsequent call will not see this as an available (unused) SMPU.</p>
<p>It is up to the user to implement, if needed, a system in which a semaphore will lock-out all but one CPU from calling this function at once.</p>
<dl class="section note"><dt>Note</dt><dd>This function is applicable for both CPUSS ver_1 and ver_2.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The base address for the SMPU structure returned if an unused structure was found. If an empty structure was not found, the returned pointer is NULL.</td></tr>
    <tr><td class="paramname">reqMode</td><td>This parameter (request mode) selects how the user wants to select a SMPU structure.</td></tr>
  </table>
  </dd>
</dl>
<table class="doxtable">
<tr>
<th>reqMode </th><th>Description  </th></tr>
<tr>
<td>CY_PROT_REQMODE_HIGHPRIOR </td><td>Return the SMPU structure with the highest priority. </td></tr>
<tr>
<td>CY_PROT_REQMODE_LOWPRIOR </td><td>Return the SMPU structure with the lowest priority. </td></tr>
<tr>
<td>CY_PROT_REQMODE_INDEX </td><td>Return the SMPU structure with the specific index. </td></tr>
</table>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">smpuIndex</td><td>This is the index of the requested SMPU structure. It is only used if the request mode is reqMode = CY_PROT_REQMODE_INDEX.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Status of the function call.</dd></dl>
<table class="doxtable">
<tr>
<th>Status </th><th>Description  </th></tr>
<tr>
<td>CY_PROT_SUCCESS </td><td>The Slave PU struct was disabled. </td></tr>
<tr>
<td>CY_PROT_FAILURE </td><td>The Master or Slave SMPU struct is disabled and possibly locked. </td></tr>
<tr>
<td>CY_PROT_UNAVAILABLE </td><td>The requested structure in use or there were no unused structures. </td></tr>
</table>
<dl class="section user"><dt>Function Usage</dt><dd><div class="fragment"><div class="line"></div><div class="line">    <span class="comment">/* Scenario: Need to find available SMPU structure with highest priority </span></div><div class="line"><span class="comment">    *  and configure it.</span></div><div class="line"><span class="comment">    */</span></div><div class="line">    </div><div class="line">    <a class="code" href="struct_p_r_o_t___s_m_p_u___s_m_p_u___s_t_r_u_c_t___type.html">PROT_SMPU_SMPU_STRUCT_Type</a> *reqStr;</div><div class="line">    </div><div class="line">    <span class="comment">/* Find required SMPU structure */</span></div><div class="line">    <span class="keywordflow">if</span> (<a class="code" href="group__group__prot__enums.html#gga13ede85383a4afaf5ed3a14b470e38bda462f07fcb31ed8a07dd273af4290691d">CY_PROT_SUCCESS</a> != <a class="code" href="group__group__prot__functions__smpu.html#ga9d10062d2d4cb3d656141b7d3217d7a9">Cy_Prot_GetSmpuStruct</a>(&amp;reqStr, <a class="code" href="group__group__prot__enums.html#ggaaeba5a362760906a0b1e0f73a177d9d7aa2f960efb4d291b72c77432e3a20a30a">CY_PROT_REQMODE_HIGHPRIOR</a>, 0U))</div><div class="line">    {</div><div class="line">       <span class="comment">/* Insert error handling */</span></div><div class="line">    }</div><div class="line">    <span class="keywordflow">else</span></div><div class="line">    {</div><div class="line">        <a class="code" href="structcy__stc__smpu__cfg__t.html">cy_stc_smpu_cfg_t</a> smpuCfg_m = {</div><div class="line">            <span class="comment">/*.address =*/</span> 0UL,                         <span class="comment">/* Not applicable for master struct */</span></div><div class="line">            <span class="comment">/*.regionSize =*/</span> (<a class="code" href="group__group__prot__enums.html#gaad39ed0d259460f717edfe9d08fc005f">cy_en_prot_size_t</a>)0UL,   <span class="comment">/* Not applicable for master struct */</span></div><div class="line">            <span class="comment">/*.subregions =*/</span> 0UL,                      <span class="comment">/* Not applicable for master struct */</span></div><div class="line">            <span class="comment">/*.userPermission =*/</span> <a class="code" href="group__group__prot__enums.html#gga330789bc5242c26b8a32df63fa8720e5aad6e3850fb76be4bd78240a4fc284985">CY_PROT_PERM_R</a>,       <span class="comment">/* Read access always available for Master */</span></div><div class="line">            <span class="comment">/*.privPermission =*/</span> <a class="code" href="group__group__prot__enums.html#gga330789bc5242c26b8a32df63fa8720e5aa7d757bf3cedd4f675b65d3ed642d315">CY_PROT_PERM_RW</a>,      <span class="comment">/* Allow read and write accesses */</span></div><div class="line">            <span class="comment">/*.secure =*/</span> <span class="keyword">true</span>,                         <span class="comment">/* Only allow &quot;secure&quot; bus masters */</span></div><div class="line">            <span class="comment">/*.pcMatch =*/</span> <span class="keyword">false</span>,                       <span class="comment">/* Perform access evaluation */</span></div><div class="line">            <span class="comment">/*.pcMask =*/</span> (uint16_t)0UL                 <span class="comment">/* Only allow PC=0 bus masters */</span></div><div class="line">        };</div><div class="line">        </div><div class="line">        <span class="comment">/* Configure the master of the found struct */</span></div><div class="line">        <span class="keywordflow">if</span>(<a class="code" href="group__group__prot__enums.html#gga13ede85383a4afaf5ed3a14b470e38bda462f07fcb31ed8a07dd273af4290691d">CY_PROT_SUCCESS</a> != <a class="code" href="group__group__prot__functions__smpu.html#ga1152bf9c8a08744825b62d7d3ddad10d">Cy_Prot_ConfigSmpuMasterStruct</a>(reqStr, &amp;smpuCfg_m))</div><div class="line">        {</div><div class="line">            <span class="comment">/* Insert error handling */</span></div><div class="line">        }</div><div class="line">        <span class="keywordflow">else</span></div><div class="line">        {</div><div class="line">            <span class="comment">/* Enable the master of the found struct */</span></div><div class="line">            <span class="keywordflow">if</span>(<a class="code" href="group__group__prot__enums.html#gga13ede85383a4afaf5ed3a14b470e38bda462f07fcb31ed8a07dd273af4290691d">CY_PROT_SUCCESS</a> != <a class="code" href="group__group__prot__functions__smpu.html#ga87bd25407886fb5072cc108af2dcb305">Cy_Prot_EnableSmpuMasterStruct</a>(reqStr))</div><div class="line">            {</div><div class="line">                <span class="comment">/* Insert error handling */</span></div><div class="line">            }</div><div class="line">        }</div><div class="line">    }</div></div><!-- fragment --></dd></dl>

</div>
</div>
<a id="ga1152bf9c8a08744825b62d7d3ddad10d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga1152bf9c8a08744825b62d7d3ddad10d">&#9670;&nbsp;</a></span>Cy_Prot_ConfigSmpuMasterStruct()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__prot__enums.html#ga13ede85383a4afaf5ed3a14b470e38bd">cy_en_prot_status_t</a> Cy_Prot_ConfigSmpuMasterStruct </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_p_r_o_t___s_m_p_u___s_m_p_u___s_t_r_u_c_t___type.html">PROT_SMPU_SMPU_STRUCT_Type</a> *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structcy__stc__smpu__cfg__t.html">cy_stc_smpu_cfg_t</a> *&#160;</td>
          <td class="paramname"><em>config</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Configures a Shared Memory Protection Unit (SMPU) master protection struct with its protection attributes. </p>
<p>This function configures the master struct governing the corresponding slave struct pair. It is a mechanism to protect the slave SMPU struct. Since the memory location of the slave struct is known, the address, regionSize and subregions of the configuration struct are not applicable.</p>
<p>Note that only the user/privileged write permissions are configurable. The read and execute permissions are read-only and cannot be configured.</p>
<dl class="section note"><dt>Note</dt><dd>This function is applicable for both CPUSS ver_1 and ver_2.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The register base address of the protection struct being configured.</td></tr>
    <tr><td class="paramname">config</td><td>Initialization structure with all the protection attributes.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Status of the function call.</dd></dl>
<table class="doxtable">
<tr>
<th>Status </th><th>Description  </th></tr>
<tr>
<td>CY_PROT_SUCCESS </td><td>SMPU master struct was successfully configured. </td></tr>
<tr>
<td>CY_PROT_FAILURE </td><td>The resource is locked. </td></tr>
<tr>
<td>CY_PROT_BAD_PARAM </td><td>An incorrect/invalid parameter was passed. </td></tr>
</table>
<dl class="section user"><dt>Function Usage</dt><dd><div class="fragment"><div class="line"></div><div class="line">    <span class="comment">/* Scenario: A bus master must not be able to access the PROT_SMPU_SMPU_STRUCT0</span></div><div class="line"><span class="comment">                 master and slave structs unless operating with PC=0, &quot;secure&quot; and</span></div><div class="line"><span class="comment">                 &quot;privileged&quot; access settings. The PROT_SMPU_SMPU_STRUCT0 slave </span></div><div class="line"><span class="comment">                 struct is already configured and enabled. */</span></div><div class="line">    </div><div class="line">    <a class="code" href="structcy__stc__smpu__cfg__t.html">cy_stc_smpu_cfg_t</a> smpuCfg_m = {</div><div class="line">        <span class="comment">/*.address =*/</span> 0UL,                         <span class="comment">/* Not applicable for master struct */</span></div><div class="line">        <span class="comment">/*.regionSize =*/</span> (<a class="code" href="group__group__prot__enums.html#gaad39ed0d259460f717edfe9d08fc005f">cy_en_prot_size_t</a>)0UL,   <span class="comment">/* Not applicable for master struct */</span></div><div class="line">        <span class="comment">/*.subregions =*/</span> 0UL,                      <span class="comment">/* Not applicable for master struct */</span></div><div class="line">        <span class="comment">/*.userPermission =*/</span> <a class="code" href="group__group__prot__enums.html#gga330789bc5242c26b8a32df63fa8720e5aad6e3850fb76be4bd78240a4fc284985">CY_PROT_PERM_R</a>,       <span class="comment">/* Read access always available for Master */</span></div><div class="line">        <span class="comment">/*.privPermission =*/</span> <a class="code" href="group__group__prot__enums.html#gga330789bc5242c26b8a32df63fa8720e5aa7d757bf3cedd4f675b65d3ed642d315">CY_PROT_PERM_RW</a>,      <span class="comment">/* Allow read and write accesses */</span></div><div class="line">        <span class="comment">/*.secure =*/</span> <span class="keyword">true</span>,                         <span class="comment">/* Only allow &quot;secure&quot; bus masters */</span></div><div class="line">        <span class="comment">/*.pcMatch =*/</span> <span class="keyword">false</span>,                       <span class="comment">/* Perform access evaluation */</span></div><div class="line">        <span class="comment">/*.pcMask =*/</span> (uint16_t)0UL                 <span class="comment">/* Only allow PC=0 bus masters */</span></div><div class="line">    };</div><div class="line">    </div><div class="line">    <span class="comment">/* Configure the master struct of SMPU #0 */</span></div><div class="line">    <span class="keywordflow">if</span>(<a class="code" href="group__group__prot__enums.html#gga13ede85383a4afaf5ed3a14b470e38bda462f07fcb31ed8a07dd273af4290691d">CY_PROT_SUCCESS</a> != <a class="code" href="group__group__prot__functions__smpu.html#ga1152bf9c8a08744825b62d7d3ddad10d">Cy_Prot_ConfigSmpuMasterStruct</a>(PROT_SMPU_SMPU_STRUCT0, &amp;smpuCfg_m))</div><div class="line">    {</div><div class="line">        <span class="comment">/* Insert error handling */</span></div><div class="line">    }</div><div class="line">    <span class="keywordflow">else</span></div><div class="line">    {</div><div class="line">        <span class="comment">/* Enable the master struct of SMPU #0 */</span></div><div class="line">        <span class="keywordflow">if</span>(<a class="code" href="group__group__prot__enums.html#gga13ede85383a4afaf5ed3a14b470e38bda462f07fcb31ed8a07dd273af4290691d">CY_PROT_SUCCESS</a> != <a class="code" href="group__group__prot__functions__smpu.html#ga87bd25407886fb5072cc108af2dcb305">Cy_Prot_EnableSmpuMasterStruct</a>(PROT_SMPU_SMPU_STRUCT0))</div><div class="line">        {</div><div class="line">            <span class="comment">/* Insert error handling */</span></div><div class="line">        }</div><div class="line">    }</div><div class="line"></div></div><!-- fragment --></dd></dl>

</div>
</div>
<a id="gac5c238971d86bc638507259c9a461f54"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gac5c238971d86bc638507259c9a461f54">&#9670;&nbsp;</a></span>Cy_Prot_ConfigSmpuSlaveStruct()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__prot__enums.html#ga13ede85383a4afaf5ed3a14b470e38bd">cy_en_prot_status_t</a> Cy_Prot_ConfigSmpuSlaveStruct </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_p_r_o_t___s_m_p_u___s_m_p_u___s_t_r_u_c_t___type.html">PROT_SMPU_SMPU_STRUCT_Type</a> *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structcy__stc__smpu__cfg__t.html">cy_stc_smpu_cfg_t</a> *&#160;</td>
          <td class="paramname"><em>config</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Configures a Shared Memory Protection Unit (SMPU) slave protection struct with its protection attributes. </p>
<p>This function configures the slave struct of an SMPU pair, which can protect any memory region in a device from invalid bus master accesses.</p>
<dl class="section note"><dt>Note</dt><dd>This function is applicable for both CPUSS ver_1 and ver_2.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The register base address of the protection structure being configured.</td></tr>
    <tr><td class="paramname">config</td><td>Initialization structure with all the protection attributes.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Status of the function call.</dd></dl>
<table class="doxtable">
<tr>
<th>Status </th><th>Description  </th></tr>
<tr>
<td>CY_PROT_SUCCESS </td><td>SMPU slave struct was successfully configured. </td></tr>
<tr>
<td>CY_PROT_FAILURE </td><td>The resource is locked. </td></tr>
<tr>
<td>CY_PROT_BAD_PARAM </td><td>An incorrect/invalid parameter was passed. </td></tr>
</table>
<dl class="section user"><dt>Function Usage</dt><dd><div class="fragment"><div class="line"></div><div class="line">    <span class="comment">/* Scenario: A bus master must not be able to access the memory region </span></div><div class="line"><span class="comment">                 0x10000200 ~ 0x10000FFF unless it is operating at PC=0 or PC=2 */</span></div><div class="line">    </div><div class="line">    <a class="code" href="structcy__stc__smpu__cfg__t.html">cy_stc_smpu_cfg_t</a> smpuCfg_s = {</div><div class="line">        <span class="comment">/*.address =*/</span> (uint32_t *)0x10000000UL,    <span class="comment">/* Starting address at start of Flash */</span></div><div class="line">        <span class="comment">/*.regionSize =*/</span> <a class="code" href="group__group__prot__enums.html#ggaad39ed0d259460f717edfe9d08fc005fa0a5fe31cf4a2de284e6b631f1a4c8ec7">CY_PROT_SIZE_4KB</a>,         <span class="comment">/* Protect block of 4 KBytes */</span></div><div class="line">        <span class="comment">/*.subregions =*/</span> <a class="code" href="group__group__prot__enums.html#gga618195213f866568fb71ed14af59cf6ca9b41ba059d2baba289e8776d46cea7ef">CY_PROT_SUBREGION_DIS0</a>,   <span class="comment">/* Disable protection for first 512 (4096/8) Bytes */</span></div><div class="line">        <span class="comment">/*.userPermission =*/</span> <a class="code" href="group__group__prot__enums.html#gga330789bc5242c26b8a32df63fa8720e5aa60056a96ee4d8d2133b69e3714a318b">CY_PROT_PERM_RWX</a>,     <span class="comment">/* Allow all user mode accesses */</span></div><div class="line">        <span class="comment">/*.privPermission =*/</span> <a class="code" href="group__group__prot__enums.html#gga330789bc5242c26b8a32df63fa8720e5aa60056a96ee4d8d2133b69e3714a318b">CY_PROT_PERM_RWX</a>,     <span class="comment">/* Allow all privileged mode accesses */</span></div><div class="line">        <span class="comment">/*.secure =*/</span> <span class="keyword">false</span>,                        <span class="comment">/* Allow &quot;non-secure&quot; bus masters */</span></div><div class="line">        <span class="comment">/*.pcMatch =*/</span> <span class="keyword">false</span>,                       <span class="comment">/* Perform access evaluation */</span></div><div class="line">        <span class="comment">/*.pcMask =*/</span> (uint16_t)<a class="code" href="group__group__prot__enums.html#gga4486bc74d6e98ad99c1ce4d532e48d0fa0b17d740a164ae90f06a4ab2f17d79d0">CY_PROT_PCMASK2</a>     <span class="comment">/* Allow PC=0 and PC=2 accesses */</span></div><div class="line">    };</div><div class="line">    </div><div class="line">    <span class="comment">/* Configure the slave struct of SMPU #0 */</span></div><div class="line">    <span class="keywordflow">if</span>(<a class="code" href="group__group__prot__enums.html#gga13ede85383a4afaf5ed3a14b470e38bda462f07fcb31ed8a07dd273af4290691d">CY_PROT_SUCCESS</a> != <a class="code" href="group__group__prot__functions__smpu.html#gac5c238971d86bc638507259c9a461f54">Cy_Prot_ConfigSmpuSlaveStruct</a>(PROT_SMPU_SMPU_STRUCT0, &amp;smpuCfg_s))</div><div class="line">    {</div><div class="line">        <span class="comment">/* Insert error handling */</span></div><div class="line">    }</div><div class="line">    <span class="keywordflow">else</span></div><div class="line">    {</div><div class="line">        <span class="comment">/* Enable the slave struct of SMPU #0 */</span></div><div class="line">        <span class="keywordflow">if</span>(<a class="code" href="group__group__prot__enums.html#gga13ede85383a4afaf5ed3a14b470e38bda462f07fcb31ed8a07dd273af4290691d">CY_PROT_SUCCESS</a> != <a class="code" href="group__group__prot__functions__smpu.html#ga3398e43534912ca2b980d08d08287801">Cy_Prot_EnableSmpuSlaveStruct</a>(PROT_SMPU_SMPU_STRUCT0))</div><div class="line">        {</div><div class="line">            <span class="comment">/* Insert error handling */</span></div><div class="line">        }</div><div class="line">    }</div><div class="line"></div></div><!-- fragment --></dd></dl>

</div>
</div>
<a id="ga87bd25407886fb5072cc108af2dcb305"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga87bd25407886fb5072cc108af2dcb305">&#9670;&nbsp;</a></span>Cy_Prot_EnableSmpuMasterStruct()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__prot__enums.html#ga13ede85383a4afaf5ed3a14b470e38bd">cy_en_prot_status_t</a> Cy_Prot_EnableSmpuMasterStruct </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_p_r_o_t___s_m_p_u___s_m_p_u___s_t_r_u_c_t___type.html">PROT_SMPU_SMPU_STRUCT_Type</a> *&#160;</td>
          <td class="paramname"><em>base</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Enables the Master SMPU structure. </p>
<p>This is an SMPU master struct enable function. The SMPU protection settings will take effect after successful completion of this function call.</p>
<dl class="section note"><dt>Note</dt><dd>This function is applicable for both CPUSS ver_1 and ver_2.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The base address for the protection unit structure being configured.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Status of the function call.</dd></dl>
<table class="doxtable">
<tr>
<th>Status </th><th>Description  </th></tr>
<tr>
<td>CY_PROT_SUCCESS </td><td>The Master PU struct was enabled. </td></tr>
<tr>
<td>CY_PROT_FAILURE </td><td>The Master PU struct is disabled and possibly locked. </td></tr>
</table>
<dl class="section user"><dt>Function Usage</dt><dd><div class="fragment"><div class="line"></div><div class="line">    <span class="comment">/* Scenario: The master struct of PROT_SMPU_SMPU_STRUCT0 is configured to </span></div><div class="line"><span class="comment">                 protect its slave struct and needs to be enabled. */</span></div><div class="line">    </div><div class="line">    <span class="keywordflow">if</span>(<a class="code" href="group__group__prot__enums.html#gga13ede85383a4afaf5ed3a14b470e38bda462f07fcb31ed8a07dd273af4290691d">CY_PROT_SUCCESS</a> != <a class="code" href="group__group__prot__functions__smpu.html#ga87bd25407886fb5072cc108af2dcb305">Cy_Prot_EnableSmpuMasterStruct</a>(PROT_SMPU_SMPU_STRUCT0))</div><div class="line">    {</div><div class="line">        <span class="comment">/* Insert error handling */</span></div><div class="line">    }</div><div class="line"></div></div><!-- fragment --></dd></dl>

</div>
</div>
<a id="gaefa4f2694e66f39444b714b8505305b7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaefa4f2694e66f39444b714b8505305b7">&#9670;&nbsp;</a></span>Cy_Prot_DisableSmpuMasterStruct()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__prot__enums.html#ga13ede85383a4afaf5ed3a14b470e38bd">cy_en_prot_status_t</a> Cy_Prot_DisableSmpuMasterStruct </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_p_r_o_t___s_m_p_u___s_m_p_u___s_t_r_u_c_t___type.html">PROT_SMPU_SMPU_STRUCT_Type</a> *&#160;</td>
          <td class="paramname"><em>base</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Disables the Master SMPU structure. </p>
<p>This is an SMPU master struct disable function. The SMPU protection settings will seize to take effect after successful completion of this function call.</p>
<dl class="section note"><dt>Note</dt><dd>This function is applicable for both CPUSS ver_1 and ver_2.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The base address for the protection unit structure being configured.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Status of the function call.</dd></dl>
<table class="doxtable">
<tr>
<th>Status </th><th>Description  </th></tr>
<tr>
<td>CY_PROT_SUCCESS </td><td>The Master PU struct was disabled. </td></tr>
<tr>
<td>CY_PROT_FAILURE </td><td>The Master PU struct is enabled and possibly locked. </td></tr>
</table>
<dl class="section user"><dt>Function Usage</dt><dd><div class="fragment"><div class="line">    </div><div class="line">    <span class="comment">/* Scenario: The master struct of PROT_SMPU_SMPU_STRUCT0 needs to be disabled.</span></div><div class="line"><span class="comment">                 Or it needs to be reconfigured and hence must first be disabled. */</span></div><div class="line">    </div><div class="line">    <span class="keywordflow">if</span>(<a class="code" href="group__group__prot__enums.html#gga13ede85383a4afaf5ed3a14b470e38bda462f07fcb31ed8a07dd273af4290691d">CY_PROT_SUCCESS</a> != <a class="code" href="group__group__prot__functions__smpu.html#ga87bd25407886fb5072cc108af2dcb305">Cy_Prot_EnableSmpuMasterStruct</a>(PROT_SMPU_SMPU_STRUCT0))</div><div class="line">    {</div><div class="line">        <span class="comment">/* Insert error handling */</span></div><div class="line">    }</div><div class="line"></div></div><!-- fragment --></dd></dl>

</div>
</div>
<a id="ga3398e43534912ca2b980d08d08287801"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga3398e43534912ca2b980d08d08287801">&#9670;&nbsp;</a></span>Cy_Prot_EnableSmpuSlaveStruct()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__prot__enums.html#ga13ede85383a4afaf5ed3a14b470e38bd">cy_en_prot_status_t</a> Cy_Prot_EnableSmpuSlaveStruct </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_p_r_o_t___s_m_p_u___s_m_p_u___s_t_r_u_c_t___type.html">PROT_SMPU_SMPU_STRUCT_Type</a> *&#160;</td>
          <td class="paramname"><em>base</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Enables the Slave SMPU structure. </p>
<p>This is an SMPU slave struct enable function. The SMPU protection settings will take effect after successful completion of this function call.</p>
<dl class="section note"><dt>Note</dt><dd>This function is applicable for both CPUSS ver_1 and ver_2.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The base address for the protection unit structure being configured.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Status of the function call.</dd></dl>
<table class="doxtable">
<tr>
<th>Status </th><th>Description  </th></tr>
<tr>
<td>CY_PROT_SUCCESS </td><td>The Slave PU struct was enabled. </td></tr>
<tr>
<td>CY_PROT_FAILURE </td><td>The Slave PU struct is disabled and possibly locked. </td></tr>
</table>
<dl class="section user"><dt>Function Usage</dt><dd><div class="fragment"><div class="line"></div><div class="line">    <span class="comment">/* Scenario: The slave struct of PROT_SMPU_SMPU_STRUCT0 is configured to </span></div><div class="line"><span class="comment">                 protect a resource and needs to be enabled. */</span></div><div class="line">    </div><div class="line">    <span class="keywordflow">if</span>(<a class="code" href="group__group__prot__enums.html#gga13ede85383a4afaf5ed3a14b470e38bda462f07fcb31ed8a07dd273af4290691d">CY_PROT_SUCCESS</a> != <a class="code" href="group__group__prot__functions__smpu.html#ga3398e43534912ca2b980d08d08287801">Cy_Prot_EnableSmpuSlaveStruct</a>(PROT_SMPU_SMPU_STRUCT0))</div><div class="line">    {</div><div class="line">        <span class="comment">/* Insert error handling */</span></div><div class="line">    }</div><div class="line"></div></div><!-- fragment --></dd></dl>

</div>
</div>
<a id="ga7d5ad654f90ef163ce8dcb14a21379f3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga7d5ad654f90ef163ce8dcb14a21379f3">&#9670;&nbsp;</a></span>Cy_Prot_DisableSmpuSlaveStruct()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__prot__enums.html#ga13ede85383a4afaf5ed3a14b470e38bd">cy_en_prot_status_t</a> Cy_Prot_DisableSmpuSlaveStruct </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_p_r_o_t___s_m_p_u___s_m_p_u___s_t_r_u_c_t___type.html">PROT_SMPU_SMPU_STRUCT_Type</a> *&#160;</td>
          <td class="paramname"><em>base</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Disables the Slave SMPU structure. </p>
<p>This is an SMPU slave struct disable function. The SMPU protection settings will seize to take effect after successful completion of this function call.</p>
<dl class="section note"><dt>Note</dt><dd>This function is applicable for both CPUSS ver_1 and ver_2.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The base address for the protection unit structure being configured.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Status of the function call.</dd></dl>
<table class="doxtable">
<tr>
<th>Status </th><th>Description  </th></tr>
<tr>
<td>CY_PROT_SUCCESS </td><td>The Slave PU struct was disabled. </td></tr>
<tr>
<td>CY_PROT_FAILURE </td><td>The Slave PU struct is enabled and possibly locked. </td></tr>
</table>
<dl class="section user"><dt>Function Usage</dt><dd><div class="fragment"><div class="line">    </div><div class="line">    <span class="comment">/* Scenario: The slave struct of PROT_SMPU_SMPU_STRUCT0 needs to be disabled.</span></div><div class="line"><span class="comment">                 Or it needs to be reconfigured and hence must first be disabled. */</span></div><div class="line">    </div><div class="line">    <span class="keywordflow">if</span>(<a class="code" href="group__group__prot__enums.html#gga13ede85383a4afaf5ed3a14b470e38bda462f07fcb31ed8a07dd273af4290691d">CY_PROT_SUCCESS</a> != <a class="code" href="group__group__prot__functions__smpu.html#ga7d5ad654f90ef163ce8dcb14a21379f3">Cy_Prot_DisableSmpuSlaveStruct</a>(PROT_SMPU_SMPU_STRUCT0))</div><div class="line">    {</div><div class="line">        <span class="comment">/* Insert error handling */</span></div><div class="line">    }</div><div class="line"></div></div><!-- fragment --></dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part
<div id="nav-path" class="navpath">
    <ul>
        <li class="footer">
            Generated for <b>MTB CAT1 Peripheral driver library</b> by <b>Cypress Semiconductor Corporation</b>.
            All rights reserved.
        </li>
    </ul>
</div>
-->
</body>
</html>
